﻿<UserControl x:Class="VMClusterManager.Controls.ResourceViews.MemoryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
            >
    <UserControl.Resources>
        <Style TargetType="{x:Type TextBox}" >
            <Style.Triggers>
                <Trigger Property="Validation.HasError" Value="True">
                    <Setter Property="ToolTip" Value="Value must be integer greater than 0."/>

                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <StackPanel Orientation="Horizontal">
        <TextBlock Text="Startup RAM: " VerticalAlignment="Top"/>
        <StackPanel Orientation="Vertical">
            <TextBox Name="MemQuantity" VerticalAlignment="Top" Text="{Binding Size, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}"  MinWidth="50">
            </TextBox>
            <StackPanel Orientation="Horizontal">
                <StackPanel.Resources>
                    <Style TargetType="{x:Type TextBlock}">
                        <Setter Property="TextAlignment" Value="Right"/>
                        <Setter Property="FontSize" Value="10"/>
                        <Setter Property="FontStyle" Value="Italic"/>
                    </Style>
                </StackPanel.Resources>
                <TextBlock Text="max: "/>
                <TextBlock Text="{Binding MaxSize}"/>
            </StackPanel>
        </StackPanel>

    </StackPanel>
    
</UserControl>
